The present invention relates to rendering electronic documents that contain color images and text.
Electronic documents can be displayed on many different types of electronic devices and using different display applications. Electronic documents can include content in a variety of colors, and can be stored and/or displayed using different color palettes. A palette is a set of colors used to render one or more objects, such as text objects or graphics objects. The palette used to display an object can depend on the available storage and/or the processing power. For example, a display environment, such as a device or application, may be able to display rich text documents that combine text and graphics using multiple palettes or a single palette. The number of colors supported by the display environment can also vary because of available storage and/or processing power.
A technique for displaying rich text documents is to render them using vector graphics. Rendering using vector graphics includes non-trivial computing, which may not be efficient on low power devices. Another technique is to convert the document into a raster image. A raster image includes a collection of individual pixels, one pixel for each point on a computer screen. Raster images can have storage requirements that are too high for limited storage devices.
Handheld devices are one category of electronic devices that can be used to store and display electronic documents. Typical handheld devices are constrained in both the amount of memory available and processing power. Documents can be loaded on to handheld devices from computers or other devices. For example, a document can be loaded on to a handheld device through a desktop application of a computer. The number of colors supported by handheld devices may be less than the number of colors supported in the desktop application. The desktop application configures a document, if necessary, for viewing and storage in a handheld device. The configured document is transmitted to the handheld device through a synchronization interface for the handheld, such as a HotSync® interface distributed by Palm, Inc. of Milpitas, Calif. Then, the transferred document can be viewed in the handheld.
If the device has one system palette, one approach for displaying an image on the device is to modify the system palette based on the colors in the image. The system palette is then changed again to display a second image. Another approach is to modify all color images and text so that they use the colors in the system palette.